<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
    <style>

        div{
            width: 200px;
            height: 200px;
            border: 1px solid;
        }
        @media (max-width:399px){
                div{
                    background-color:green;
                }
        }
        @media screen and ( min-width:400px) and (max-width:799px){
                div{
                    background-color: red ;
                }
        }
        @media  screen  and (min-width:800px){
            div{
                background-color: blue;
            }
            
        }
    </style>
<body>
    <div>

    </div>
</body>
</html>